#include<stdio.h>
main() { 
    int na,nb,a,b,r,rmin; 
    na=1;nb=1;rmin=323-17-27;  
    for(na=1;na<=(323-27)/17;na++) 
    {   nb=(323-na*17)/27;
    r=323-na*17-nb*27;  
    if(r<rmin) 
    {rmin=r;a=na;b=nb;}   
    }  
    printf("a=%d,b=%d,min=%d\n",a,b,rmin
    );  
    }